Skip to content

refactor(diff): rename diff_opts.layout "inline" to "unified"#295

Merged
ThomasK33 merged 1 commit into
mainfrom
rename-inline-to-unified
Jun 23, 2026
Merged

refactor(diff): rename diff_opts.layout "inline" to "unified"#295
ThomasK33 merged 1 commit into
mainfrom
rename-inline-to-unified

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Renames the diff_opts.layout = "inline" option (added in #195, queued for v0.4.0 via release-please #279) to "unified", before it ships in a tagged release. Tracked in #293.

@wookayin pointed out that the shipped "inline" mode isn't a true "inline" diff in the VS Code sense — it renders a unified diff in a separate rightbelow vsplit pane, not an in-place virtual-text overlay in the same window. Naming it "inline" now would force a breaking rename later, once we add the real in-place overlay (the mode that most deserves the name "inline"). Renaming is free now (not yet released) and a breaking change after #279 merges.

What changed

  • Config value "inline""unified": validation + error message (config.lua), the ClaudeCodeDiffLayout type alias (types.lua), all four dispatch sites (diff.lua), and the stored layout value (diff_inline.lua).
  • User-facing buffer name: <file> (inline diff)<file> (unified diff).
  • Docs: README layout enum + label; a CHANGELOG.md [Unreleased] entry for layout = "unified".
  • Tests: the accept test now expects "unified"; a new test asserts the former "inline" is rejected.

Decisions

Validation

  • mise run all: treefmt clean, luacheck 0/0, 703/703 tests pass (baseline 702 + the new rejection test).
  • Headless Neovim smoke test: layout = "unified" accepted, "inline" rejected (error names 'unified'), "vertical" still works.

The true in-place overlay (the future "inline") is tracked in #294.

Refs #293, #195, #82

🤖 Generated with Claude Code

The shipped `layout = "inline"` renders a unified diff in a separate
vsplit pane, not a true in-place virtual-text overlay. Renaming it to
"unified" frees the "inline" name for a future real in-place overlay and
avoids a breaking rename after release (flagged by @wookayin on #195).

The value was added in #195 and is queued for v0.4.0 (release-please
breaking change for any released version. "inline" is now rejected by
config validation (no deprecated alias) so the name is cleanly reserved;
the validation error names "unified" to guide anyone tracking main.

Internal implementation names are intentionally left unchanged — they
describe the inline-style rendering, not the layout value:
- module lua/claudecode/diff_inline.lua and its functions
- the claudecode_inline_diff buffer variable
- the ClaudeCodeInlineDiff{Add,Delete,AddSign,DeleteSign} highlight groups

The user-facing buffer name is updated from "(inline diff)" to
"(unified diff)".

Refs #293, #195, #82

Change-Id: I66e00ac960ee3de13ffa135b32dcba0cd171c793
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@claude review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: d498eedb93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 288c9bf Jun 23, 2026
4 checks passed
@ThomasK33 ThomasK33 deleted the rename-inline-to-unified branch June 23, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

diff: reconsider layout = "inline" naming before v0.4.0 (reserve "inline" for a true in-place overlay)

1 participant